Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix file descriptor leak problem & enable keepalive by default #191

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

plpan
Copy link

@plpan plpan commented Jun 4, 2018

No description provided.

@pkopac
Copy link
Collaborator

pkopac commented Nov 9, 2018

@QuentinPerez: IDK about the keep-alive, but the resp.Body.Close() is certainly not correct in current code; it only gets invoked on the NopCloser, which... does nothing. So, the Reader from http stays open forever.

@pkopac pkopac mentioned this pull request Nov 9, 2018
@plpan
Copy link
Author

plpan commented Nov 15, 2018

@pkopac When the resp.Body is closed, we can fix leak by reusing the obj of SuperAgent. We have proved it works.

@pkopac
Copy link
Collaborator

pkopac commented Nov 15, 2018

@plpan: thanks, makes sense... but, if you don't reuse all instances (eg. we don't in our code), then it leaks. So I still consider this a bug.

@plpan
Copy link
Author

plpan commented Nov 16, 2018

@pkopac Yeal, you're right. We should disable it by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants